<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>SWFUpload デモ</title>
<link href="../swfupload2.5.0/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../swfupload2.5.0/js1/swfupload.js"></script>
<script type="text/javascript" src="../swfupload2.5.0/js1/fileprogress.js"></script>
<script type="text/javascript" src="../swfupload2.5.0/js1/handlers.js"></script>
<script type="text/javascript">
	var swfu;

	window.onload = function() {
		var settings = {
			flash_url : "../swfupload2.5.0/swfupload.swf",
			upload_url : "../Upload",
			file_size_limit : "100 MB",
			file_types : "*.*",
			file_types_description : "All Files",
			file_upload_limit : 100,
			file_queue_limit : 0,
			custom_settings : {
				progressTarget : "fsUploadProgress",
				cancelButtonId : "btnCancel"
			},
			debug : false,

			// Button settings
			button_image_url : "../swfupload2.5.0/TestImageNoText_65x29.png",
			button_width : "200",
			button_height : "29",
			button_placeholder_id : "spanButtonPlaceHolder",
			button_text : '選択（複数）',
			button_text_style : ".theFont { font-size: 22; }",
			button_text_left_padding : 2,
			button_text_top_padding : 3,

			// The event handler functions are defined in handlers.js
			file_queued_handler : fileQueued,
			file_queue_error_handler : fileQueueError,
			upload_start_handler : uploadStart,
			upload_progress_handler : uploadProgress,
			upload_error_handler : uploadError,
			upload_success_handler : uploadSuccess
		};

		swfu = new SWFUpload(settings);
	};

	function handleUpload() {
		var emailid = document.getElementById("email").value;
		swfu.setPostParams({
			email : emailid
		});
		//swfu.setUploadURL("CommonsFileUploadServlet?test=234");
		swfu.startUpload();
	}
</script>
</head>
<body>
	<div id="content">
		<h2>ふくすうあっぷろ～ど　ひとつづつ　あっぷ</h2>
		<p>選択ボタンをクリックして、ファイルを複数選択してね。あっぷろ～どボタンでファイルを1個づつアップロードするよ。</p>
		出力される場所：サーバの「%Webroot%photo」
		<form id="form1" action="../Upload" method="post" enctype="multipart/form-data">
			<div class="fieldset flash" id="fsUploadProgress">
				<span class="legend">Upload Queue</span>
			</div>
			<div id="divStatus">0 Files Uploaded</div>
			<div id="divMovieContainer">
				<span id="spanButtonPlaceHolder"></span>
			</div>
			<input type="button" value="あっぷろ～ど" onclick="handleUpload();" style="margin-left: 2px; font-size: 8pt; height: 29px;" />
			Enter Email to send:<input name="email" id="email" value="" type="text" style="width: 230px;" />
		</form>
	</div>
</body>
</html>
